BonsaiDiffusionImpl

Android Bonsai runtime entry point backed by the NDK bridge.

The implementation keeps native execution off the caller thread, serializes generation requests, and relays step progress through the shared local diffusion status contract.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
private val mutex: Mutex
Link copied to clipboard
private val statusFlow: MutableSharedFlow<LocalDiffusionStatus>

Functions

Link copied to clipboard
open suspend override fun interrupt()
Link copied to clipboard
open override fun observeStatus(): Flow<LocalDiffusionStatus>
Link copied to clipboard
open suspend override fun process(payload: TextToImagePayload, modelPath: String): String
Link copied to clipboard
private inline fun <T> withBackgroundThreadPriority(block: () -> T): T